package com.lxm.controller;

import com.lxm.dto.Result;
import com.lxm.service.UtilsService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//此处表现层用于处理一些工具类型的请求，比如发送验证码，接收视频
@RestController
@RequestMapping("/Utils")
@Tag(name = "工具接口")
public class UtilsController {
    @Resource
    private UtilsService utilsService;

    @Operation(summary = "发送验证码")
    @GetMapping("/code/{phone}")
    public Result sendCode(@PathVariable String phone){
        return utilsService.sendCode(phone);
    }

}
